﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="set_permission.aspx.cs" Inherits="EDP.Application.Web.Permission.set_permission" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>

    <script type="text/javascript">
        document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                F.f_disable('panel_panel_object_ctl00_btn_query');
                __doPostBack('panel$panel_object$ctl00$btn_query', '');
            }
        }
    </script>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel" runat="server" />
        <f:HiddenField ID="hidden_fullCode" runat="server" />
        <f:Panel ID="panel" runat="server" ShowBorder="false" ShowHeader="false" Margin="10" Layout="Region">
            <Items>
                <f:Tree ID="tree_permission" runat="server" ShowHeader="true" Title="权限对象" Margin="0" RegionPosition="Left" Width="300" OnNodeCheck="tree_permission_NodeCheck" />
                <f:Panel ID="panel_object" runat="server" ShowBorder="true" ShowHeader="true" Title="授权对象" Margin="0 0 0 5" RegionPosition="Center" Layout="Fit">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right" QueryToolbar="true">
                            <Items>
                                <f:DropDownList ID="ddl_object" runat="server" Width="100" Margin="0" AutoPostBack="true" OnSelectedIndexChanged="ddl_object_SelectedIndexChanged" />

                                <f:DropDownList ID="ddl_position_type" runat="server" Hidden="true" Margin="0 0 0 10" QueryName="PositionTypeId" Width="150" />
                                <f:TextBox ID="tb_position_keywrod" runat="server" Hidden="true" Margin="0 0 0 10" EmptyText="职务名称" QueryName="Name" TextMode="Text" Width="240" />

                                <f:TextBox ID="tb_organizationType_keywrod" runat="server" Hidden="true" Margin="0 0 0 10" EmptyText="组织类型名称/组织类型编号" QueryName="NumbersNameKeywrod" Width="240" />

                                <f:DropDownList ID="ddl_organization_type" runat="server" Hidden="true" Margin="0 0 0 10" QueryName="OrganizationTypeId" Width="150" />
                                <f:TextBox ID="tb_organization_keywrod" runat="server" Hidden="true" EmptyText="组织单元名称/组织单元编号" QueryName="NumbersNameKeywrod" Margin="0 0 0 10" Width="240" />

                                <f:TextBox ID="tb_role_keywrod" runat="server" Hidden="true" Margin="0 0 0 10" Width="240" QueryName="NumbersNameKeywrod" EmptyText="角色编号/角色名称" />

                                <f:TextBox ID="tb_user_keywrod" runat="server" Hidden="true" Margin="0 0 0 10" EmptyText="账号/姓名" QueryName="AccountNameKeywrod" Width="150" />
                                <f:TextBox ID="tb_user_dept" runat="server" Hidden="true" Margin="0 0 0 10" EmptyText="部门名称/部门编号" QueryName="DepartmentKeyword" Width="150" />
                                <f:TextBox ID="tb_user_posi" runat="server" Hidden="true" Margin="0 0 0 10" EmptyText="职位" QueryName="PositionTitle" Width="150" />

                                <f:Button ID="btn_query" runat="server" Text=" 查 询 " Icon="SystemSearch" Margin="0 0 0 10" OnClick="QueryClick" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_save" runat="server" Text=" 保 存 " Icon="Disk" Margin="0 10 0 0" OnClick="btn_save_Click" />
                                <f:Button ID="btn_close" runat="server" Text=" 关 闭 " Icon="Cross" Margin="0 10 0 0" />
                                <f:Button ID="btn_more" runat="server" EnablePermission="false" Text="更多..." EnablePostBack="false">
                                    <Menu runat="server" Margin="0">
                                        <f:MenuButton ID="btn_cache" runat="server" Margin="0" Text="重置缓存" ConfirmTitle="重置缓存" ConfirmText="是否重置缓存？" ConfirmTarget="Self" ConfirmIcon="Question" OnClick="btn_cache_Click" />
                                    </Menu>
                                </f:Button>
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Items>
                        <f:Grid ID="grid_position" runat="server" ShowBorder="false" ShowHeader="false" Hidden="true" Margin="0" DataKeyNames="ID" AllowSorting="false" AllowPaging="false" EnableCheckBoxSelect="true">
                            <Columns>
                                <f:BoundField DataField="Name" DataSimulateTreeLevelField="LevelsDisplay" ExpandUnusedSpace="true" HeaderText="职务名称" DataToolTipField="Name" />
                                <f:BoundField DataField="PositionTypeName" Width="100" HeaderText="职类" />
                                <f:BoundField DataField="GradeLevelsList" Width="500" HeaderText="职级" DataToolTipField="GradeLevelsList" />
                                <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                                <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                <f:BoundField DataField="ModifyUserName" Width="80" HeaderText="修改人" />
                                <f:BoundField DataField="ModifyTime" Width="140" HeaderText="修改时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                <f:CheckBoxField DataField="IsEnable" Width="65" HeaderText="启用" TextAlign="center" />
                            </Columns>
                        </f:Grid>
                        <f:Grid ID="grid_organizationType" runat="server" ShowBorder="false" ShowHeader="false" Hidden="true" Margin="0" DataKeyNames="ID" EnableCheckBoxSelect="true" SortField="Numbers" SortDirection="ASC"
                            OnPageIndexChange="grid_organizationType_PageIndexChange" OnSort="grid_organizationType_Sort">
                            <Columns>
                                <f:BoundField DataField="Name" Width="180" HeaderText="组织类型名称" />
                                <f:BoundField DataField="Numbers" Width="150" HeaderText="组织类型编号" />
                                <f:BoundField DataField="PositionScope" SortField="Numbers" ExpandUnusedSpace="true" HeaderText="职务范围" />
                                <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                                <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                <f:BoundField DataField="ModifyUserName" Width="80" HeaderText="修改人" />
                                <f:BoundField DataField="ModifyTime" Width="140" HeaderText="修改时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                <f:CheckBoxField DataField="IsEnable" Width="65" HeaderText="启用" TextAlign="center" />
                            </Columns>
                        </f:Grid>
                        <f:Panel ID="panel_object_tree_grid" runat="server" Hidden="true" ShowBorder="false" ShowHeader="false" Margin="10" Layout="Region">
                            <Items>
                                <f:Tree ID="tree_object" runat="server" Hidden="true" ShowHeader="false" Margin="0" RegionPosition="Left" Width="260" OnNodeCommand="tree_object_NodeCommand" />
                                <f:Grid ID="grid_organization" runat="server" Hidden="true" ShowHeader="false" DataKeyNames="ID" Margin="0 0 0 5" AllowSorting="false" AllowPaging="false"
                                    EnableCheckBoxSelect="true" CheckBoxSelectOnly="true" RegionPosition="Center">
                                    <Columns>
                                        <f:BoundField DataField="PropertyName" Width="50" EnableLock="true" HeaderText="性质" />
                                        <f:BoundField DataField="Name" DataSimulateTreeLevelField="LevelsDisplay" ExpandUnusedSpace="true" HeaderText="名称" />
                                        <f:BoundField DataField="Numbers" Width="100" HeaderText="编号" />
                                        <f:BoundField DataField="ParentName" Width="150" HeaderText="上级组织" />
                                        <f:BoundField DataField="OrganizationTypeName" Width="120" HeaderText="组织类型" NullDisplayText="机构" />
                                        <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                        <f:CheckBoxField DataField="IsEnable" Width="65" HeaderText="启用" TextAlign="center" />
                                    </Columns>
                                </f:Grid>
                                <f:Grid ID="grid_department_position" runat="server" Hidden="true" ShowHeader="false" DataKeyNames="ID" Margin="0 0 0 5" AllowSorting="false" AllowPaging="false"
                                    EnableCheckBoxSelect="true" CheckBoxSelectOnly="true" RegionPosition="Center">
                                    <Columns>
                                        <f:BoundField DataField="DepartmentName" Width="200" HeaderText="部门名称" />
                                        <f:BoundField DataField="PositionTypeName" Width="150" HeaderText="职类" />
                                        <f:BoundField DataField="PositionName" Width="150" HeaderText="职务名称" />
                                        <f:BoundField DataField="PositionTitle" Width="240" HeaderText="职位名称" />
                                        <f:BoundField DataField="GradeLevelsList" ExpandUnusedSpace="true" HeaderText="职级" />
                                    </Columns>
                                </f:Grid>
                                <f:Grid ID="grid_role" runat="server" ShowHeader="false" Hidden="true" Margin="0 0 0 5" DataKeyNames="ID" EnableCheckBoxSelect="true" SortField="Numbers" SortDirection="ASC"
                                    OnPageIndexChange="grid_role_PageIndexChange" OnSort="grid_role_Sort">
                                    <Columns>
                                        <f:BoundField DataField="Numbers" Width="100" HeaderText="角色编号" />
                                        <f:BoundField DataField="Name" Width="150" HeaderText="角色名称" />
                                        <f:BoundField DataField="ClassifyName" Width="150" HeaderText="所属分类" />
                                        <f:BoundField DataField="SortNumber" Width="65" HeaderText="排序号" />
                                        <f:BoundField DataField="Remarks" ExpandUnusedSpace="true" HeaderText="描述" />
                                        <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                        <f:BoundField DataField="ModifyUserName" Width="80" HeaderText="修改人" />
                                        <f:BoundField DataField="ModifyTime" Width="140" HeaderText="修改时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                        <f:CheckBoxField DataField="IsEnable" Width="65" HeaderText="启用" TextAlign="center" />
                                    </Columns>
                                </f:Grid>
                                <f:Grid ID="grid_user" runat="server" ShowHeader="false" Hidden="true" Margin="0 0 0 5" DataKeyNames="ID" EnableCheckBoxSelect="true" SortField="PositionGradeLevels" SortDirection="DESC"
                                    OnPageIndexChange="grid_user_PageIndexChange" OnSort="grid_user_Sort">
                                    <Columns>
                                        <f:BoundField DataField="Account" Width="80" HeaderText="账号" />
                                        <f:BoundField DataField="Name" Width="80" HeaderText="姓名" />
                                        <f:BoundField DataField="GenderName" SortField="GenderId" Width="50" HeaderText="性别" />
                                        <f:BoundField DataField="Mobile" Width="100" HeaderText="手机号" />
                                        <f:BoundField DataField="OrganizationName" DataToolTipField="OrganizationName" Width="100" HeaderText="机构" />
                                        <f:BoundField DataField="DepartmentNumbers" DataToolTipField="DepartmentNumbers" Width="80" HeaderText="部门编号" />
                                        <f:BoundField DataField="DepartmentName" DataToolTipField="DepartmentName" ExpandUnusedSpace="true" HeaderText="部门" />
                                        <f:BoundField DataField="PositionName" Width="80" HeaderText="职务" />
                                        <f:BoundField DataField="PositionTitle" ExpandUnusedSpace="true" HeaderText="职位" />
                                        <f:BoundField DataField="PositionGradeName" SortField="PositionGradeLevels" Width="65" HeaderText="职级" />
                                        <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                                        <f:CheckBoxField DataField="IsEnable" Width="50" HeaderText="启用" TextAlign="center" />
                                    </Columns>
                                </f:Grid>
                            </Items>
                        </f:Panel>
                    </Items>
                </f:Panel>
            </Items>
        </f:Panel>
    </form>
</body>
</html>
